package cn.jbit.houserent.action;

import java.util.List;


import cn.jbit.houserent.bean.User;
import cn.jbit.houserent.biz.HouseBiz;
import cn.jbit.houserent.biz.UserBiz;
import cn.jbit.houserent.biz.impl.HouseBizImpl;
import cn.jbit.houserent.biz.impl.UserBizImpl;
import cn.jbit.houserent.bean.House;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class HouseAction extends ActionSupport {
	private List<House> result;
	
	@Override
	public String execute() throws Exception {
		ActionContext ac = ActionContext.getContext();
		User user=(User)ac.getSession().get("user");
		HouseBiz hb =new HouseBizImpl();
		result = hb.getHouseByUser(user);
		return SUCCESS;
		
	}

	public List<House> getResult() {
		return result;
	}

	public void setResult(List<House> result) {
		this.result = result;
	}

}
